const tencentcloud = require('tencentcloud-sdk-nodejs');
const VodClient = tencentcloud.vod.v20180717.Client;
const models = tencentcloud.vod.v20180717.Models;
const Credential = tencentcloud.common.Credential;
const ClientProfile = tencentcloud.common.ClientProfile;
const HttpProfile = tencentcloud.common.HttpProfile;

let cred = new Credential(
  'AKID3pLeFjYHBoKDqDBIwTkk6OPL3Wps5Ae3',
  'KO4WhcHh4FB9l2DFJBvfDLn4A9vRVIgu'
);
let httpProfile = new HttpProfile();
httpProfile.endpoint = 'vod.tencentcloudapi.com';
let clientProfile = new ClientProfile();
clientProfile.httpProfile = httpProfile;
let client = new VodClient(cred, '', clientProfile);

let req = new models.PullEventsRequest();

let params = '{}';
req.from_json_string(params);

client.PullEvents(req, function(errMsg, response) {
  if (errMsg) {
    console.log(errMsg);
    return;
  }

  console.log(response.to_json_string());
});
